<?php
/*
 * Created on 11.03.2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 class Controller_Content extends Controller_Base {
 	 	
 	function index($args) {
		$alias 		= $this->registry['router_table']['url'][0]  ? $this->registry['router_table']['url'][0] : 'index';
 		$id 		= $this->menu->getIdByAlias($args[0] ? $args[0] : 'index');

		$template = new Template('content.tmpl');

 		$content 	= new Model_Content($id);
		
		$item = $content->find();
		
		$template->setArg('content',$item);
		
		return array(
			status 		=> 0,
			template 	=> $template
		);
//		echo "<div style='color: white;'>".$item->text."</div>";		 		
 	}
 	
 }
?>
